﻿Imports System.Xml.Serialization
Imports KanBan.Pgd.Common

Namespace Resources

    <XmlType(AnonymousType:=True), _
     XmlRoot(ElementName:="competencies", [Namespace]:="", IsNullable:=False)> _
    Partial Public Class CompetencyResource

        Private _competencies As CompetencyItem()

        <XmlElement("competency", Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)> _
        Public Property Competnecies() As CompetencyItem()
            Get
                Return _competencies
            End Get
            Set(ByVal value As CompetencyItem())
                _competencies = value
            End Set
        End Property

        Public Shared Function GetResource() As CompetencyResource
            Return XmlDeserializer(Of CompetencyResource).Deserialize("Resources\Competencies.xml")
        End Function

    End Class

    <XmlType(AnonymousType:=True)> _
    Partial Public Class CompetencyItem

        Private _id As String

        Private _name As String

        Private _description As String

        Private _areaId As String

        <XmlAttribute("id")> _
        Public Property Id() As String
            Get
                Return Me._id
            End Get
            Set(ByVal value As String)
                Me._id = value
            End Set
        End Property

        <XmlAttribute("name")> _
        Public Property Name() As String
            Get
                Return Me._name
            End Get
            Set(ByVal value As String)
                Me._name = value
            End Set
        End Property

        <XmlAttribute("description")> _
        Public Property Description() As String
            Get
                Return Me._description
            End Get
            Set(ByVal value As String)
                Me._description = value
            End Set
        End Property


        <XmlAttribute("areaId")> _
        Public Property AreaId() As String
            Get
                Return Me._areaId
            End Get
            Set(ByVal value As String)
                Me._areaId = value
            End Set
        End Property

    End Class

End Namespace
